package com.tensquare.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.tensquare.entity.Problem;
import com.tensquare.entity.Result;
import com.tensquare.service.IProblemService;

/**
 * <p>
 * 问题 前端控制器
 * </p>
 *
 * @author caoxingsheng
 * @since 2019-06-01
 */
@RestController
@RequestMapping("/problem")
public class ProblemController extends BaseController {
	@Autowired
	private IProblemService problemService;
	/**
	 * 查询
	 * @param id
	 * @return
	 */
	@GetMapping("/getById/{id}")
	public Result getById(@PathVariable("id") String id) {
		Problem problem = problemService.getById(id);
		return setResultSuccess(problem);
	}
}
